package router

import (
	"github.com/gin-gonic/gin"
	"mxshop_api/goods-web/api/banners"
	"mxshop_api/user-web/middlewares"
)

func InitBannerRouter(router *gin.RouterGroup) {

	router.GET("", banners.List)
	router.PUT("/:id", middlewares.IsAdminAuth(), middlewares.IsAdminAuth(), banners.Update)
	router.DELETE("/:id", middlewares.JWTAuth(), middlewares.IsAdminAuth(), banners.Delete)
	router.POST("", banners.New)
}
